<?php

class CardModel extends Model
{
	
	
	# 最近打卡日期
	public function lastCardDate($u_id){
		$_ucd['u_id'] = $u_id;
		$_u_order = 'ucd_date desc';
		$ucd = M('Ucard')->where($_ucd)->order($_u_order)->find();
		return $ucd['ucd_date'];
	}
	
	public function addCard($u_id){
		$_ucd['u_id'] = $u_id;
		$_ucd['ucd_date'] = date('Y-m-d', time());
		$_ucd['ucd_time'] = time();
		M('Ucard')->add($_ucd);
	}
	
	
	
	
}



?>